<!DOCTYPE html>
<html>
    <head>
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'account.label', default: 'Account')}" />
        <title>企业信息</title>
    </head>
    <body class="fixed-navbar fixed-sidebar">
        <div class="small-header transition animated fadeIn">
            <div class="hpanel">
                <div class="panel-body">
                    <div id="hbreadcrumb" class="pull-right">
                        <ol class="hbreadcrumb breadcrumb">
                            <li><g:link controller="opportunity" action="show"
                                        id="${this.account?.opportunity?.id}">订单详情</g:link></li>
                        </ol>
                    </div>
                    <h2 class="font-light m-b-xs">
                        企业信息
                    </h2>
                </div>
            </div>
        </div>
        <div class="content animate-panel">
            <div class="row">
                <div class="hpanel hyellow">
                    <div class="panel-heading">
                        <div class="panel-tools">
                            <g:link class="btn btn-info btn-xs" controller="account" action="edit1"
                                    params="[account: this.account.id]">修改基础信息</g:link>
                            <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                        </div>
                        企业基本信息
                    </div>
                    <div class="panel-body">

                        <g:form action="save1" class="form-horizontal">
                            <div class="form-group">
                                <label class="col-md-2 control-label">城市</label>
                                <div class="col-md-3"><span class="cont">${this.account?.city?.name}</span></div>

                                <label class="col-md-2 control-label">区县</label>
                                <div class="col-md-3"><span class="cont">${this.account?.district?.name}</span></div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label">公司名称</label>
                                <div class="col-md-3"><span class="cont">${this.account.name}</span></div>
                                <label class="col-md-2 control-label">注册地址</label>
                                <div class="col-md-3"><span class="cont">${this.account.registeredAddress}</span></div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label">办公地址</label>
                                <div class="col-md-3"><span class="cont">${this.account.officeAddress}</span></div>
                                <label class="col-md-2 control-label">公司规模</label>
                                <div class="col-md-3"><span class="cont">${this.account.enterpriseScale}</span></div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label">财务联系电话</label>
                                <div class="col-md-3"><span class="cont">${this.account.financePhone}</span></div>
                                <label class="col-md-2 control-label">是否民营</label>
                                <div class="col-md-3"><g:if test="${this.account?.privateEnterprise}"><span class="cont">是</span></g:if><g:else>
                                    <span class="cont">否</span>
                                </g:else></div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label">实收资本币种</label>
                                <div class="col-md-3"><span class="cont">${this.account?.currencyType?.name}</span></div>
                                <label class="col-md-2 control-label">营业执照号</label>
                                <div class="col-md-3"><span class="cont">${this.account.licenseCode}</span></div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label">公司代码号</label>
                                <div class="col-md-3"><span class="cont">${this.account.code}</span></div>
                            </div>

                            </div>
                            <g:hiddenField name="type.name" value="Department"/>
                            <g:hiddenField name="opportunityId" value="${opportunityId}"/>


                        </g:form>

                    <div class="row" id="fourth">
                        <div class="hpanel hgreen">
                            <div class="panel-heading">
                                <div class="panel-tools">
                                    <g:link class="btn btn-info btn-xs" controller="accountDebt" action="create"
                                            params="[account: this.account.id]"><i class="fa fa-plus"></i>新增</g:link>
                                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                                </div>
                                企业负债信息
                            </div>

                            <div class="panel-body no-padding">
                                <div class="table-responsive">
                                    <table class="table table-striped table-bordered table-hover text-center">
                                        <thead>
                                        <tr>
                                            <g:sortableColumn property="type" title="客户名称"></g:sortableColumn>
                                            <g:sortableColumn property="fullName" title="账龄"></g:sortableColumn>
                                            <g:sortableColumn property="idNumber" title="金额"></g:sortableColumn>
                                            <g:sortableColumn property="maritalStatus" title="登记机构"></g:sortableColumn>
                                            <g:sortableColumn property="age" title="登记日期"></g:sortableColumn>
                                            <g:sortableColumn property="profession" title="登记人"></g:sortableColumn>
                                            <g:sortableColumn property="country" title="会计科目"></g:sortableColumn>
                                            <g:sortableColumn property="identityType" title="币种"></g:sortableColumn>
                                            <g:sortableColumn property="identityType" title="操作"></g:sortableColumn>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <g:each in="${com.next.AccountDebt.findAllByAccount(this.account)}">
                                            <tr>
                                                <td>
                                            <g:link controller="accountDebt"  action="edit" id = "${it.id}"> ${it.debtClient?.name}</g:link></td>

                                </td>
                                            <td>
                                                ${it.age}
                                            </td>
                                            <td>
                                                ${it?.amount}
                                            </td>
                                            <td >
                                                ${it?.registerAccount}
                                            </td>
                                            <td>
                                                ${it?.registerDate?.format("yyyy-MM-dd")}
                                            </td>
                                            <td>

                                                ${it?.registerUser}

                                            </td>
                                            <td>
                                                ${it?.subject?.name}
                                            </td>
                                            <td>
                                                ${it?.currencyType?.name}
                                            </td>
                                            <td>
                                                <g:link controller="accountDebt" action="edit"
                                                        class="btn btn-xs btn-primary btn-outline"
                                                        params="[id: it?.id, opportunity: this?.opportunity?.id]">
                                                    <i class="fa fa-edit"></i> 编辑
                                                </g:link>
                                            </td>
                                            </tr>
                                        </g:each>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="row" id="fourth">
                        <div class="hpanel hgreen">
                            <div class="panel-heading">
                                <div class="panel-tools">
                                    <g:link class="btn btn-info btn-xs" controller="certificate" action="create"
                                            params="[account: this.account.id]"><i class="fa fa-plus"></i>新增</g:link>
                                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                                </div>
                                企业资质认证信息
                            </div>

                            <div class="panel-body no-padding">
                                <div class="table-responsive">
                                    <table class="table table-striped table-bordered table-hover text-center">
                                        <thead>
                                        <tr>
                                            <g:sortableColumn property="type" title="认证时间"></g:sortableColumn>
                                            <g:sortableColumn property="fullName" title="证书名称"></g:sortableColumn>
                                            <g:sortableColumn property="idNumber" title="认证部门"></g:sortableColumn>
                                            <g:sortableColumn property="cellphone" title="认证类型"></g:sortableColumn>
                                            <g:sortableColumn property="maritalStatus" title="登记机构"></g:sortableColumn>
                                            <g:sortableColumn property="age" title="登记日期"></g:sortableColumn>
                                            <g:sortableColumn property="profession" title="登记人"></g:sortableColumn>
                                            <g:sortableColumn property="country" title="有效日期"></g:sortableColumn>
                                            <g:sortableColumn property="identityType" title="更新日期"></g:sortableColumn>
                                            <g:sortableColumn property="identityType" title="操作"></g:sortableColumn>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <g:each in="${com.next.Certificate.findAllByAccount(this.account)}">
                                            <tr>
                                                <td>
                                            <g:link controller="certificate"  action="edit" id = "${it.id}"> ${it.startTime?.format("yyyy-MM-dd")}</g:link></td>

                                </td>
                                            <td>
                                                ${it.name}
                                            </td>
                                            <td>
                                                ${it?.certificateDepartment}
                                            </td>
                                            <td >
                                                ${it?.type?.name}
                                            </td>
                                            <td>
                                                ${it?.registerAccount}
                                            </td>
                                            <td>

                                                ${it?.registerDate?.format("yyyy-MM-dd")}

                                            </td>
                                            <td>
                                                ${it?.registerUser}
                                            </td>

                                            <td>
                                                ${it?.endTime?.format("yyyy-MM-dd")}
                                            </td>
                                            <td>
                                                ${it?.modifiedDate?.format("yyyy-MM-dd")}
                                            </td>
                                            <td>
                                                <g:link controller="certificate" action="edit"
                                                        class="btn btn-xs btn-primary btn-outline"
                                                        params="[id: it?.id, opportunity: this?.opportunity?.id]">
                                                    <i class="fa fa-edit"></i> 编辑
                                                </g:link>
                                            </td>
                                            </tr>
                                        </g:each>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="row" id="fourth">
                        <div class="hpanel hgreen">
                            <div class="panel-heading">
                                <div class="panel-tools">
                                    <g:link class="btn btn-info btn-xs" controller="propertyInformation" action="create"
                                            params="[account: this.account.id]"><i class="fa fa-plus"></i>新增</g:link>
                                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                                </div>
                                企业固定资产信息
                            </div>

                            <div class="panel-body no-padding">
                                <div class="table-responsive">
                                    <table class="table table-striped table-bordered table-hover text-center">
                                        <thead>
                                        <tr>
                                            <g:sortableColumn property="type" title="权利证书号"></g:sortableColumn>
                                            <g:sortableColumn property="fullName" title="币种"></g:sortableColumn>
                                            <g:sortableColumn property="idNumber" title="评估日期"></g:sortableColumn>
                                            <g:sortableColumn property="cellphone" title="评估机构"></g:sortableColumn>
                                            <g:sortableColumn property="maritalStatus" title="资产净值"></g:sortableColumn>
                                            <g:sortableColumn property="age" title="固定资产名称"></g:sortableColumn>
                                            <g:sortableColumn property="profession" title="资产状态"></g:sortableColumn>
                                            <g:sortableColumn property="country" title="资产类型"></g:sortableColumn>
                                            <g:sortableColumn property="identityType" title="入账价值"></g:sortableColumn>
                                            <g:sortableColumn property="identityType" title="更新日期"></g:sortableColumn>
                                            <g:sortableColumn property="identityType" title="操作"></g:sortableColumn>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <g:each in="${com.next.PropertyInformation.findAllByAccount(this.account)}">
                                            <tr>
                                                <td>
                                            <g:link controller="propertyInformation"  action="edit" id = "${it.id}"> ${it.certificate?.name}</g:link></td>

                                </td>
                                            <td>
                                                ${it.currencyType?.name}
                                            </td>
                                            <td>
                                                ${it?.valuationDate?.format("yyyy-MM-dd")}
                                            </td>
                                            <td >
                                                ${it?.valuationProvider?.name}
                                            </td>
                                            <td>
                                                ${it?.totalPrice}
                                            </td>
                                            <td>

                                                ${it?.name}

                                            </td>
                                            <td>
                                                ${it?.status}
                                            </td>
                                            <td>
                                                ${it?.type?.name}
                                            </td>
                                            <td>
                                                ${it?.appliedTotalPrice}
                                            </td>
                                            <td>
                                                ${it?.modifiedDate?.format("yyyy-MM-dd")}
                                            </td>
                                            <td>
                                                <g:link controller="propertyInformation" action="edit"
                                                        class="btn btn-xs btn-primary btn-outline"
                                                        params="[id: it?.id, opportunity: this?.opportunity?.id]">
                                                    <i class="fa fa-edit"></i> 编辑
                                                </g:link>
                                            </td>
                                            </tr>
                                        </g:each>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="row" id="fourth">
                        <div class="hpanel hgreen">
                            <div class="panel-heading">
                                <div class="panel-tools">
                                    <g:link class="btn btn-info btn-xs" controller="accountListedInfo" action="create"
                                            params="[account: this.account.id]"><i class="fa fa-plus"></i>新增</g:link>
                                    <a class="showhide"><i class="fa fa-chevron-up"></i></a>
                                </div>
                                企业上市信息
                            </div>

                            <div class="panel-body no-padding">
                                <div class="table-responsive">
                                    <table class="table table-striped table-bordered table-hover text-center">
                                        <thead>
                                        <tr>
                                            <g:sortableColumn property="type" title="上市地"></g:sortableColumn>
                                            <g:sortableColumn property="fullName" title="上市日期"></g:sortableColumn>
                                            <g:sortableColumn property="idNumber" title="股票代码"></g:sortableColumn>
                                            <g:sortableColumn property="cellphone" title="股票名称"></g:sortableColumn>
                                            <g:sortableColumn property="maritalStatus" title="股票类型"></g:sortableColumn>
                                            <g:sortableColumn property="age" title="更新日期"></g:sortableColumn>
                                            <g:sortableColumn property="profession" title="登记日期"></g:sortableColumn>
                                            <g:sortableColumn property="country" title="登记机构"></g:sortableColumn>
                                            <g:sortableColumn property="country" title="操作"></g:sortableColumn>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <g:each in="${com.next.AccountListedInfo.findAllByAccount(this.account)}">
                                            <tr>
                                                <td>
                                            <g:link controller="accountListedInfo"  action="edit" id = "${it.id}"> ${it.address}</g:link></td>

                                </td>
                                            <td>
                                                ${it.listedDate?.format("yyyy-MM-dd")}
                                            </td>
                                            <td>
                                                ${it?.stockCode}
                                            </td>
                                            <td >
                                                ${it?.stockName}
                                            </td>
                                            <td>
                                                ${it?.stockType}
                                            </td>
                                            <td>
                                                ${it?.modifiedDate?.format("yyyy-MM-dd")}
                                            </td>
                                            <td>

                                                ${it?.registerDate?.format("yyyy-MM-dd")}

                                            </td>
                                            <td>
                                                ${it?.registerAccount}
                                            </td>
                                            <td>
                                            <g:link controller="accountListedInfo" action="edit"
                                                    class="btn btn-xs btn-primary btn-outline"
                                                    params="[id: it?.id, opportunity: this?.opportunity?.id]">
                                                <i class="fa fa-edit"></i> 编辑
                                            </g:link>
                                            </td>
                                            </tr>
                                        </g:each>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
                </div>
            </div>
        </div>
    </body>
</html>
